package Books;

import Books.Book;

import java.util.Arrays;
import java.util.Objects;

public class BooksList {
    private Book[] books = new Book[10];
    private int val;

    public BooksList(){
        this.books[0] = new Book("三国演义","罗贯中",10,"小说");
        this.books[1] = new Book("红楼梦","曹雪芹",13,"小说");
        this.books[2] = new Book("西游记","吴承恩",40,"小说");

        this.val = 3;
    }

    public Book getBook(int cmp){
        return books[cmp];
    }

//    public void setBook(Book book,int val){
//        books[val]
//    }

    @Override
    public String toString() {
        return super.toString();
    }

    public void setBooks(Book book,int cmp) {
        this.books[cmp] = book;
    }

    public int getVal() {
        return val;
    }

    public void setVal(int val) {
        this.val = val;
    }
}
